package com.zkthink.ceres.common.enums;

import com.zkthink.exception.BizException;
import lombok.Getter;

@Getter
public enum CharacterTypeEnum {
    CSWZ_CHARACTER(0, "成熟稳重"),
    HPKL_CHARACTER(1, "活泼开朗"),
    FQYM_CHARACTER(2, "风趣幽默"),
    JJXS_CHARACTER(3, "积极向上"),
    SJRE_CHARACTER(4, "善解人意"),
    AJWY_CHARACTER(5, "安静文雅"),
    WRTT_CHARACTER(6, "温柔体贴"),
    XHZS_CHARACTER(7, "贤惠知书");

    private int code;

    private String desc;

    CharacterTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static CharacterTypeEnum getDscByType(Integer type) {
        for (CharacterTypeEnum p : values()) {
            if (p.getCode() == type.intValue()) {
                return p;
            }
        }
        throw new BizException("no support promotionPlan");
    }
}
